export const formDict = [
  {
    label: "姓名",
    attr: "name",
    type: "input",
    disabled: true,
  },
  {
    label: "年龄",
    attr: "age",
    type: "input",
  },
  {
    label: "测试slot",
    attr: "ceshi_slot",
    slot: true,
  },
  {
    label: "创建时间",
    attr: "createTime",
    type: "time",
    // format: "YYYY-MM-DD",
  },
  {
    label: "时间范围",
    attr: "timeRange",
    type: "timeRange",
  },
  {
    label: "图片",
    attr: "image",
    type: "image",
  },
  {
    label: "性别",
    attr: "sex",
    type: "radio",
    options: [
      {
        label: "男",
        value: "1",
      },
      {
        label: "女",
        value: "0",
      },
    ],
  },
  {
    label: "状态",
    attr: "status",
    type: "select",
    async fun() {
      return new Promise((res) => {
        setTimeout(() => {
          res([
            {
              label: "男",
              value: "1",
            },
            {
              label: "女",
              value: "0",
            },
          ]);
        }, 0);
      });
    },
    options: [],
  },
  {
    label: "状态多选",
    attr: "statusm",
    type: "select",
    mode: "multiple",
    options: [
      {
        label: "男",
        value: "1",
      },
      {
        label: "女",
        value: "0",
      },
    ],
  },
];

export const rules = {
  name: [{ required: true, message: "输入用户名", trigger: "blur" }],
  ceshi_slot: [{ required: true, message: "输入用户名", trigger: "blur" }],
};
